#include <stdio.h>

int main(void)
{
    int n, number, triangularNumber;

    {
    printf("Please enter a number: ");
    scanf("%i", &number);
    }
    triangularNumber = 0;

    for (n = 1; n <= number; ++n){
        triangularNumber += n;
    }

    printf("Triangular number %i is %i\n", number, triangularNumber);

    return 0;
}